<!DOCTYPE html>
<html>
	<head>
		<meta charset="UTF-8">
		<%include("/common/include.html"){}%>
		<style type="text/css">
		/* 	ul{
				height:auto;
				width:100%;
				padding:10px;
			}
			ul li{
				width:230px;
				display:inline-block;
			} */
		</style>
	</head>
	<body class="easyui-layout">
	<div data-options="region:'north',split: true,title:'快速查询'" style="height:140px;padding:10px;">
	<!-- <input id="orgid"  type="hidden" value="${orgid!}"> -->
		<form id="plateStatisticFrom"  >
		
			<div style="margin-bottom: 10px;float:left;margin-right: 10px;">
				<label class="label-top" style="width: 100%; display: block;">状态</label>
				<select name="_query.STATUS" class=" easyui-combobox theme-textbox-radius" id = "status" style="width:212px;height:32px;text-align:center" data-options="editable: false">
					<option value="">全部</option>
					<option value="1">正常</option>
					<option value="2">挂失</option>
					<option value="3">注销</option>
				</select>
			</div>
			<div style="margin-bottom: 10px;float:left;margin-right: 10px;">
				<label class="label-top" style="width: 100%; display: block;">车牌</label>
				<input  id="hphm" name="_query.HPHM" class=" easyui-textbox theme-textbox-radius" style="width:212px;height:32px;text-align:center"/>
			</div>
			<div>
				<a href="#" class="easyui-linkbutton" data-options="iconCls:'icon-search'"  style="width:212px;height:32px;float:left;margin-top: 16px;margin-right: 10px;"  onclick="searchBus()">搜索</a>
				<a href="#" class="easyui-linkbutton" data-options="iconCls:'icon-clear'"  style="width:212px;height:32px;float:left;margin-top: 16px"    onclick="clearsj()">清除</a>
			</div>
		</form>
		</div>
		<div data-options="region:'center'" style="overflow-x:hidden;">
		<table class="easyui-datagrid" id ="plateInfo" style="width:100%;height:auto;"></table>
		</div>
		
		<script>
		
		
		var $form = $('#plateStatisticFrom');
		function queryPlate(){
			$('#plateInfo').datagrid({
				cls: "theme-datagrid",
				title:"号牌维护",
				singleSelect: true,
				rownumbers: true, //显示序号
				fitColumns:true,
				pagination: true,
				pageSize: 10,
				url: "plateMaintenance/plateList",
				queryParams: sy.serializeObject($form),
			    method: 'post',
			    collapsible:true,
			    columns:[[
							{field:'ids',title:'ids',width:10,align:'center',hidden:true},
							{field:'hphm',title:'车牌号',width:10,align:'center'},
							{field:'status',title:'状态',width:10, align:'center',
								formatter: function(value,row,index){
									if(row.status == '1'){
										return  '正常';
									}else if(row.status == '2'){
										return  '已挂失';
									}else if(row.status == '3'){
										return  '已注销';
									}else{
										return  '异常';
									}
								},
								styler: function (value, row, index) {
									if(row.status == '1'){
										return 'color:green';
									}else if(row.status == '2'){
										return 'color:#5798fc';
									}else if(row.status == '3'){
										 return 'color:red';
									}else{
										return 'color:green';
									}
								
						             
						        }
							}
							]]
			})
			
		}
		
		
		$(document).ready(function () {
			 queryPlate();
		});
		
		function clearsj(){
			var initOrgan = $("#initOrgan").val();
			var initOrganName = $("#initOrganName").val();
			$("#hphm").textbox("clear");
			$("#startTime").datebox("clear");
			$("#endTime").datebox("clear");
			$("#status").combobox("clear"); 
			$("#organIds").attr("value", initOrgan);
			$("#organ").attr("value", initOrganName);
			
		}
		
		function searchBus(){
			 queryPlate();
		}
		
		
		</script>
		
	</body>
</html>
